
package Entity;

import Acquaintance.IAHouse;

/**
 * 项目的主要业务对象<br> House<br> ==========<br> 通过对House对象的操作来实现业务逻辑<br>
 * House对象遵循IAHouse接口<br> 通过接口来消除相识依赖<br> <br> 当其实例化后将以HashMap的形式存放到内存中<br>
 * 以便实现对于该对象的快速操作<br> 与数据层的同步则具有一定延迟<br> 因为该对象仅有管理员一人对其具有修改能力<br> 普通用户无修改权限<br>
 * 所有在数据同步方面采取手动同步即可<br>
 *
 * @author kocio
 */
public class EHouse implements IAHouse, Comparable {

    private String objectID;
    private int hID;
    private String houseHoster;
    private int housePrice;
    private boolean dirty;
    private float Area;
    private String Arrow;
    private String Type;
    private int Floor;
    private String Premise;
    private String Location;

    /**
     *
     * @param objectID
     */
    public void setObjectID(String objectID) {
        this.objectID = objectID;
    }

    /**
     *
     * @param hID
     */
    public void setHID(int hID) {
        this.hID = hID;
    }

    /**
     *
     * @param houseHoster
     */
    public void setHouseHoster(String houseHoster) {
        this.houseHoster = houseHoster;
    }

    /**
     *
     * @param housePrice
     */
    public void setHousePrice(int housePrice) {
        this.housePrice = housePrice;
    }

    /**
     *
     * @param b
     */
    public void setDirty(boolean b) {
        dirty = b;
    }

    /**
     *
     * @return
     */
    public String getObjectID() {
        return objectID;
    }

    /**
     *
     * @return
     */
    public int getHID() {
        return hID;
    }

    /**
     *
     * @return
     */
    public String getHouseHoster() {
        return houseHoster;
    }

    /**
     *
     * @return
     */
    public int getHousePrice() {
        return housePrice;
    }

    /**
     *
     * @return
     */
    public boolean isDirty() {
        return dirty;
    }

    /**
     *
     */
    public void finallize() {
    }

    /**
     *
     * @param o
     * @return
     */
    public int compareTo(Object o) {
        EHouse house = (EHouse) o;
        return this.housePrice > house.housePrice ? 1 : (this.housePrice == house.housePrice ? 0 : -1);
    }

    /**
     *
     * @return
     */
    public String toString() {
        return "价格为" + this.housePrice;
    }

    /**
     *
     * @return
     */
    public String getArrow() {
        return Arrow;
    }

    /**
     *
     * @return
     */
    public String getType() {
        return Type;
    }

    /**
     *
     * @return
     */
    public float getArea() {
        return Area;
    }

    /**
     *
     * @param Area
     */
    public void setArea(float Area) {
        this.Area = Area;
    }

    /**
     *
     * @param Arrow
     */
    public void setArrow(String Arrow) {
        this.Arrow = Arrow;
    }

    /**
     *
     * @param Floor
     */
    public void setFloor(int Floor) {
        this.Floor = Floor;
    }

    /**
     *
     * @param Premise
     */
    public void setPremise(String Premise) {
        this.Premise = Premise;
    }

    /**
     *
     * @param Location
     */
    public void setLocation(String Location) {
        this.Location = Location;
    }

    /**
     *
     * @param Type
     */
    public void setType(String Type) {
        this.Type = Type;
    }

    /**
     *
     * @return
     */
    public String getLocation() {
        return Location;
    }

    /**
     *
     * @return
     */
    public String getPremise() {
        return Premise;
    }

    /**
     *
     * @return
     */
    public int getFloor() {
        return Floor;
    }
}
